package edu.bbu.commonproject.desktop.gui.view.swing.utils;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Graphics;

import javax.swing.JFrame;
import javax.swing.JPanel;

public class AboutFrame extends JFrame
{
	private JPanel aboutPanel;
	
	public AboutFrame()
	{
		Design.setLookAndFeel();
		
		aboutPanel = new JPanel()
		{
			protected void paintComponent(Graphics g)
			{
				g.drawImage(Design.ABOUT_MENU, 0, 0, null);
			}
		};
		aboutPanel.setPreferredSize(new Dimension(Design.ABOUT_MENU.getWidth(null) - 10, Design.ABOUT_MENU.getHeight(null) - 10));

		this.setTitle("MongoDB file - share - About");
		this.setResizable(false);
		this.setIconImage(Design.BASE_ICON);
		this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
		
		this.getContentPane().add(aboutPanel, BorderLayout.CENTER);
		this.pack();
		this.setLocationRelativeTo(null);
		
		this.setVisible(true);
	}
}
